package com.wqy.netty.server;

import org.jboss.netty.channel.*;

/**
 * @Auther: WangQingyang
 * @Date: 2020/3/30 11:42
 * @Description:  线程安全的
 *
 */
public class HelloHandler extends SimpleChannelHandler {
    private int count;
    @Override
    public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) throws Exception {
        System.out.println((String)e.getMessage()+":"+count);
        count ++;
        super.messageReceived(ctx, e);
    }
}
